<?php
/**
 * 网春主持人和拜年对象选择
 */
require_once dirname(dirname(__DIR__))."/common.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\cls\tom\Tools;
use app\cls\tom\Config;
use app\model\Activity;

$host_id=$_POST['host_id'];//主持人id
$select_person_id=$_POST['select_person_id'];//拜年对象id
if(empty($host_id) || empty($select_person_id)){
    Response::output(-1,"缺少参数");
}
$db = SysResource::getDB(false);
$Activity=new Activity($db);

$data=$Activity->wangchun_one(['wangchun_host'=>$host_id,"wangchun_select_person"=>$select_person_id],"id,wangchun_host,wangchun_select_person,wangchun_host_name,wangchun_select_person_name,wangchun_video_url,wangchun_pic,wangchun_share_pic,wangchun_title,wangchun_duration,wangchun_width,wangchun_height");
if(empty($data)){
    Response::output(-1,"服务内部有错");
}
$data['wangchun_huati']="网春大拜年";
Response::output(0,"查询成功",$data);